from django.db import models


# TODO 定义所需要的模型类
class DayData(models.Model):
    city = models.CharField(max_length=10)
    hightest_tem = models.FloatField()
    lowest_tem = models.FloatField()
    weather = models.CharField(max_length=20)
    date = models.CharField(max_length=20)
    wind_direction = models.CharField(max_length=20)
    wind_level = models.CharField(max_length=20)
    weekday = models.CharField(max_length=20)

    class Meta:
        db_table = 'day_data'


class MonthData(models.Model):
    city = models.CharField(max_length=10)
    month = models.CharField(max_length=10)
    avg_high_tem = models.FloatField()
    avg_low_tem = models.FloatField()
    extreme_high_tem = models.FloatField()
    extreme_low_tem = models.FloatField()
    avg_air_quality = models.DecimalField(max_digits=10, decimal_places=2)
    best_air = models.DecimalField(max_digits=10, decimal_places=2)
    best_air_date = models.CharField(max_length=20)
    worst_air = models.DecimalField(max_digits=10, decimal_places=2)
    worst_air_date = models.CharField(max_length=20)

    class Meta:
        db_table = 'month_data'
